/**
 * @file	bleuart_service.h
 * @author	chipsea
 * @brief	
 * @version	0.1
 * @date	2020-11-30
 * @copyright Copyright (c) 2020, CHIPSEA Co., Ltd.
 * @note
 */
#ifndef __BLEUART_SERVICE_H__
#define __BLEUART_SERVICE_H__

#include "att.h"
#include "types.h"
#include "bcomdef.h"

#ifdef __cplusplus
extern "C"
{
#endif

///< Simple Profile Service UUID
#define BLE_UART_SERV_UUID		0xFFF0
    
///< UART TRX UUID
#define BLE_UART_CHAR1_UUID		0xFFF1
#define BLE_UART_CHAR2_UUID		0xFFF2

enum{
	bleuart_EVT_TX_NOTI_DISABLED = 1,
	bleuart_EVT_TX_NOTI_ENABLED,
	bleuart_EVT_BLE_DATA_RECIEVED,
};

/*********************************************************************
 * FUNCTIONS
 */
typedef struct
{
	uint8_t	 ev;
	uint16_t param;
	uint8_t  *data;
} bleuart_Evt_t;
typedef void (*bleuart_ProfileChangeCB_t)(bleuart_Evt_t* pev);

bStatus_t bleuart_AddService( bleuart_ProfileChangeCB_t cb);
bStatus_t bleuart_Notify( uint16 connHandle, attHandleValueNoti_t *pNoti);

/*********************************************************************
*********************************************************************/

#ifdef __cplusplus
}
#endif

#endif /* BLEUART_SERVICE_H */
